/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cegg.graph.connection;

import cegg.graph.vertex.Vertex;
import java.io.Serializable;

/**
 *
 * @author kumper
 */
public abstract class Connection implements Serializable
{
    private Vertex start;
    private Vertex end;

    public Connection(Vertex start, Vertex end) {
        this.start = start;
        this.end = end;
    }

    public boolean exists(Vertex start, Vertex end)
    {
        if ((this.start == start) && (this.end == end))
        {
            return true;
        }
        return false;
    }

    public Vertex getEnd() {
        return end;
    }

    public Vertex getStart() {
        return start;
    }
}
